#ifndef GROUP_H
#define GROUP_H

#include <list>
#include <vector>
#include <string>
#include "config.h"

using string = std::string;

struct BulletInfo{
    //子弹名称
    string name;
    //图片路径
    string imagePath;
    //攻击力,初速度
    double attackNum, velocity;

    BulletInfo() = default;

    BulletInfo(const BulletInfo &);

    BulletInfo(BulletInfo &&);

    BulletInfo &operator=(const BulletInfo &);

    BulletInfo &operator=(BulletInfo &&);
};

struct ArmyInfo{
    //兵种名称
    string name;
    //图片路径
    string imagePath;
    //血量上限,防御力
    double lifeLimit, defend;
    //制造消耗时间
    GameTimeType consumeTime;
    //消费金钱,能量
    double consumeMoney, consumeEnergy;

    ArmyInfo() = default;

    ArmyInfo(const ArmyInfo &);

    ArmyInfo(ArmyInfo &&);

    ArmyInfo &operator=(const ArmyInfo &);

    ArmyInfo &operator=(ArmyInfo &&);
};

//根据index寻找子弹的种类
const BulletInfo *getBullet(uint32_t index);
//根据index寻找兵种
const ArmyInfo *getArmy(uint32_t index);
//注册一个新的子弹种类
uint32_t registerBullet(const BulletInfo &b);
//注册一个新的兵种
uint32_t registerArmy(const ArmyInfo &a);

#endif

